package com.easylive.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: yudaxian
 * @DateTime: 2024/11/19 20:43
 **/
@Getter
@AllArgsConstructor
public enum VideoRecommendTypeEnum {
    NOT_RECOMMEND("0", "不推荐"),
    RECOMMEND("1", "推荐"),
    ;

    private String code;

    private String desc;

    public static VideoRecommendTypeEnum getEnumByCode(String code) {
        for (VideoRecommendTypeEnum e : VideoRecommendTypeEnum.values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }
}
